<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<% 
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>大连开发区健身中心</title>
		<link type="text/css" rel="stylesheet" href="<%=path %>/admin/styles/default.css" />
		<script type="text/javascript" src="<%=path %>/res/js/jquery.js"></script>
		<script type="text/javascript" src="<%=path %>/res/js/common.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/pages/link/js/link.js"></script>
	</head>
	<body>
		<form name="form1" method="post" action="" onsubmit="">
		<input type="hidden" id="message" value="${message}"/>
		<input type="hidden" id="webPath" value="<%=path %>"/>
		<input type="hidden" id="linkId" name="linkId" value=""/>
		<input type="hidden" id="linkType" name="linkType" value=""/>
		<table id="table-data-outter">
			<tr>
				<td>
					<table id="table-data-inner" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="4" nowrap="nowrap">
								<fieldset id="f-menu-path">当前位置:&nbsp;信息管理 &gt; 友情链接管理</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">友情链接名称: </td>
							<td width="45%" class="field-content">
								<input type="text" class="input" name="relatedLinkBean.linkName" id="linkName" value="<s:property value="relatedLinkBean.linkName"/>" maxlength="25" style="width:300px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="15%" class="field-title">友情链接类型: </td>
							<td width="45%" class="field-content">
								<select name="relatedLinkBean.linkType">
									<option value="0">省级网站</option>
									<option value="1">市级网站</option>
									<option value="2">其他网站</option>
								</select>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">友情链接路径: </td>
							<td width="45%" class="field-content">
								<input type="text" class="input" name="relatedLinkBean.linkPath" id="linkPath" value="<s:property value="relatedLinkBean.linkPath"/>"  style="width:300px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="15%" class="field-title">友情链接序号: </td>
							<td width="45%" class="field-content">
								<input type="text" class="input" name="relatedLinkBean.linkOrder" id="linkOrder" value="<s:property value="relatedLinkBean.linkOrder"/>" maxlength="10"/>
								<span class="font_red">*</span>
							</td>
						</tr>
					</table>
					<div id="div-button" align="center">
						<input type="button" value="保存 " onclick="submitLink()"/>
					</div>
					<table id="table-view" cellpadding="0" cellspacing="1">
						<tr class="row-header">
							<td width="5%">序号</td>
							<td>友情链接名称</td>
							<td width="15%">友情链接类型</td>
							<td>友情链接路径</td>
							<td  width="12%">友情链接序号</td>
							<td width="10%">操作</td>
						</tr>
						<s:iterator value="resultList" status="index">
							<s:if test='#index.odd == true'>
								<s:set name="var_class" value="'row-odd'" />
							</s:if>
							<s:else>
								<s:set name="var_class" value="'row-even'" />
							</s:else>
							<tr class="<s:property value='var_class' />"
						 	onmouseover="this.className='row-over'" onmouseout="this.className='<s:property value='var_class' />'">
								<td align="center"><s:property value="#index.count"/> </td>
								<td align="left"><s:property value="linkName"/></td>
								<td align="center">
									<s:elseif test="linkType == \"0\"">
									省级网站
									</s:elseif>
									<s:elseif test="linkType == \"1\"">
									市级网站
									</s:elseif>
									<s:else>
									其他网站
									</s:else>
								</td>
								<td align="left"><s:property value="linkPath"/></td>
								<td align="center"><s:property value="linkOrder"/></td>
								<td align="center">
								<a href="javascript:void(0);" onclick="delLink(<s:property value="linkId"/>)">删除</a>
								</td>
							</tr>
						</s:iterator>
					</table>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>